package com.ylb.rent.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @AUTHOR:游李滨
 * @DATE:2023/6/28 9:44
 */

@RestController
public class TestController {

    @GetMapping("/test")
    public String test(){
        return "hello world";
    }


    @PreAuthorize("@ss.hasAuth('admin')")
    @GetMapping("/test/admin")
    public String testAdmin() {
        return "test admin";
    }
}
